import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'

// 导入字体图标
import './assets/fonts/iconfont.css'

// 引入全局样式
import './assets/css/global.css'

import axios from 'axios'
// 引入外部树形表格组件
import TreeTable from 'vue-table-with-tree-grid'

// 引入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
// 引入富文本样式文件
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'



// 请求的封装
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
// 拦截请求 添加上请求头
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

// 注册树形表格组件
Vue.component('tree-table', TreeTable)

// 注册富文本组件
Vue.use(VueQuillEditor)

Vue.prototype.$http = axios



Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
